int RLED = 12;
int GLED = 11;
int SW = 2;


void setup()
{
  pinMode(RLED, OUTPUT);
  pinMode(GLED, OUTPUT);
  pinMode(SW, INPUT);
  
  digitalWrite(RLED, LOW);
  digitalWrite(GLED, LOW);
}
int a = -1;
void loop()
{
  
  if(digitalRead(SW) == LOW)
  a = a + 1;
  a = a % 3;
  if(a == 0)
  {
    digitalWrite(RLED, HIGH);
    digitalWrite(GLED, LOW);
  }
  if( a == 1)
  {
    digitalWrite(RLED, LOW);
    digitalWrite(GLED, HIGH);
   }
   if(a  == 2)
   {
     digitalWrite(RLED, LOW);
     digitalWrite(GLED, HIGH);
     delay(1000);
     digitalWrite(RLED, HIGH);
     digitalWrite(GLED, LOW);
     delay(1000);
   }
}